<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Rails::Generators::NamedBase</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" />
<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>

</head>

<body>     
    <div class="banner">
        
            <span>Ruby on Rails v4.0.0</span><br />
        
        <h1>
            <span class="type">Class</span> 
            Rails::Generators::NamedBase 
            
                <span class="parent">&lt; 
                    
                    <a href="Base.html">Rails::Generators::Base</a>
                    
                </span>
            
        </h1>
        <ul class="files">
            
            <li><a href="../../../files/railties/lib/rails/generators/named_base_rb.html">railties/lib/rails/generators/named_base.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
  


  


  
  


  


  
    <!-- Method ref -->
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
      
        <dt>A</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="NamedBase.html#method-i-application_name">application_name</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-attributes_names">attributes_names</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>C</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="NamedBase.html#method-c-check_class_collision">check_class_collision</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-class_name">class_name</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-class_path">class_path</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>F</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="NamedBase.html#method-i-file_path">file_path</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>H</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="NamedBase.html#method-i-human_name">human_name</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>I</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="NamedBase.html#method-i-i18n_scope">i18n_scope</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-indent">indent</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-index_helper">index_helper</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-inside_template">inside_template</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-inside_template-3F">inside_template?</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>M</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="NamedBase.html#method-i-module_namespacing">module_namespacing</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>N</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="NamedBase.html#method-i-namespace">namespace</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-namespaced-3F">namespaced?</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-namespaced_class_path">namespaced_class_path</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-namespaced_file_path">namespaced_file_path</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-namespaced_path">namespaced_path</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>P</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="NamedBase.html#method-i-plural_file_name">plural_file_name</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-plural_name">plural_name</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-plural_table_name">plural_table_name</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-pluralize_table_names-3F">pluralize_table_names?</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>R</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="NamedBase.html#method-i-regular_class_path">regular_class_path</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-route_url">route_url</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>S</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="NamedBase.html#method-i-singular_table_name">singular_table_name</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>T</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="NamedBase.html#method-i-table_name">table_name</a>,
              </li>
            
              
              <li>
                <a href="NamedBase.html#method-i-template">template</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>U</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="NamedBase.html#method-i-uncountable-3F">uncountable?</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>W</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="NamedBase.html#method-i-wrap_with_namespace">wrap_with_namespace</a>
              </li>
            
          </ul>
        </dd>
      
    </dl>
  

  



  

    

    

    


    
      <!-- Section attributes -->
      <div class="sectiontitle">Attributes</div>
      <table border='0' cellpadding='5'>
        
          <tr valign='top'>
            <td class='attr-rw'>
              [R]
            </td>
            <td class='attr-name'>file_name</td>
            <td class='attr-desc'></td>
          </tr>
        
          <tr valign='top'>
            <td class='attr-rw'>
              [R]
            </td>
            <td class='attr-name'>singular_name</td>
            <td class='attr-desc'></td>
          </tr>
        
      </table>
    


    <!-- Methods -->
    
      <div class="sectiontitle">Class Protected methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-c-check_class_collision">
            
              <b>check_class_collision</b>(options={})
            
            <a href="NamedBase.html#method-c-check_class_collision" name="method-c-check_class_collision" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Add a class collisions name to be checked on class initialization. You can
supply a hash with a :prefix or :suffix to be tested.</p>

<h4 id="method-c-check_class_collision-label-Examples">Examples</h4>

<pre>check_class_collision suffix: &quot;Decorator&quot;</pre>

<p>If the generator is invoked with class name Admin, it will check for the
presence of “AdminDecorator”.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-c-check_class_collision_source')" id="l_method-c-check_class_collision_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L185" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-c-check_class_collision_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 185</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">check_class_collision</span>(<span class="ruby-identifier">options</span>={})
  <span class="ruby-identifier">define_method</span> <span class="ruby-value">:check_class_collision</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">name</span> = <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:controller_class_name</span>) <span class="ruby-comment"># for ScaffoldBase</span>
      <span class="ruby-identifier">controller_class_name</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">class_name</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">class_collisions</span> <span class="ruby-node">&quot;#{options[:prefix]}#{name}#{options[:suffix]}&quot;</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                  
      <div class="sectiontitle">Instance Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-i-template">
            
              <b>template</b>(source, *args, &amp;block)
            
            <a href="NamedBase.html#method-i-template" name="method-i-template" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-template_source')" id="l_method-i-template_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L22" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-template_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 22</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">template</span>(<span class="ruby-identifier">source</span>, *<span class="ruby-identifier">args</span>, &amp;<span class="ruby-identifier">block</span>)
  <span class="ruby-identifier">inside_template</span> <span class="ruby-keyword">do</span>
    <span class="ruby-keyword">super</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
              
      <div class="sectiontitle">Instance Protected methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-i-application_name">
            
              <b>application_name</b>()
            
            <a href="NamedBase.html#method-i-application_name" name="method-i-application_name" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Tries to retrieve the application name or simple return application.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-application_name_source')" id="l_method-i-application_name_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L142" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-application_name_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 142</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">application_name</span>
  <span class="ruby-keyword">if</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">Rails</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">application</span>
    <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">application</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">'::'</span>).<span class="ruby-identifier">first</span>.<span class="ruby-identifier">underscore</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-string">&quot;application&quot;</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-attributes_names">
            
              <b>attributes_names</b>()
            
            <a href="NamedBase.html#method-i-attributes_names" name="method-i-attributes_names" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-attributes_names_source')" id="l_method-i-attributes_names_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L163" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-attributes_names_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 163</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">attributes_names</span>
  <span class="ruby-ivar">@attributes_names</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">attributes</span>.<span class="ruby-identifier">each_with_object</span>([]) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>, <span class="ruby-identifier">names</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">names</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">column_name</span>
    <span class="ruby-identifier">names</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">'password_confirmation'</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">password_digest?</span>
    <span class="ruby-identifier">names</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{a.name}_type&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">polymorphic?</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-class_name">
            
              <b>class_name</b>()
            
            <a href="NamedBase.html#method-i-class_name" name="method-i-class_name" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-class_name_source')" id="l_method-i-class_name_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L94" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-class_name_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 94</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">class_name</span>
  (<span class="ruby-identifier">class_path</span> <span class="ruby-operator">+</span> [<span class="ruby-identifier">file_name</span>]).<span class="ruby-identifier">map!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">m</span>.<span class="ruby-identifier">camelize</span> }.<span class="ruby-identifier">join</span>(<span class="ruby-string">'::'</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-class_path">
            
              <b>class_path</b>()
            
            <a href="NamedBase.html#method-i-class_path" name="method-i-class_path" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-class_path_source')" id="l_method-i-class_path_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L74" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-class_path_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 74</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">class_path</span>
  <span class="ruby-identifier">inside_template?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">namespaced?</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">regular_class_path</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">namespaced_class_path</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-file_path">
            
              <b>file_path</b>()
            
            <a href="NamedBase.html#method-i-file_path" name="method-i-file_path" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-file_path_source')" id="l_method-i-file_path_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L70" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-file_path_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 70</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">file_path</span>
  <span class="ruby-ivar">@file_path</span> <span class="ruby-operator">||=</span> (<span class="ruby-identifier">class_path</span> <span class="ruby-operator">+</span> [<span class="ruby-identifier">file_name</span>]).<span class="ruby-identifier">join</span>(<span class="ruby-string">'/'</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-human_name">
            
              <b>human_name</b>()
            
            <a href="NamedBase.html#method-i-human_name" name="method-i-human_name" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-human_name_source')" id="l_method-i-human_name_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L98" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-human_name_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 98</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">human_name</span>
  <span class="ruby-ivar">@human_name</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">singular_name</span>.<span class="ruby-identifier">humanize</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-i18n_scope">
            
              <b>i18n_scope</b>()
            
            <a href="NamedBase.html#method-i-i18n_scope" name="method-i-i18n_scope" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-i18n_scope_source')" id="l_method-i-i18n_scope_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L106" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-i18n_scope_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 106</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">i18n_scope</span>
  <span class="ruby-ivar">@i18n_scope</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">file_path</span>.<span class="ruby-identifier">tr</span>(<span class="ruby-string">'/'</span>, <span class="ruby-string">'.'</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-indent">
            
              <b>indent</b>(content, multiplier = 2)
            
            <a href="NamedBase.html#method-i-indent" name="method-i-indent" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-indent_source')" id="l_method-i-indent_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L41" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-indent_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 41</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">indent</span>(<span class="ruby-identifier">content</span>, <span class="ruby-identifier">multiplier</span> = <span class="ruby-number">2</span>)
  <span class="ruby-identifier">spaces</span> = <span class="ruby-string">&quot; &quot;</span> * <span class="ruby-identifier">multiplier</span>
  <span class="ruby-identifier">content</span>.<span class="ruby-identifier">each_line</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">:</span> <span class="ruby-node">&quot;#{spaces}#{line}&quot;</span> }.<span class="ruby-identifier">join</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-index_helper">
            
              <b>index_helper</b>()
            
            <a href="NamedBase.html#method-i-index_helper" name="method-i-index_helper" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-index_helper_source')" id="l_method-i-index_helper_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L121" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-index_helper_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 121</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index_helper</span>
  <span class="ruby-identifier">uncountable?</span> <span class="ruby-operator">?</span> <span class="ruby-node">&quot;#{plural_table_name}_index&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">plural_table_name</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-inside_template">
            
              <b>inside_template</b>()
            
            <a href="NamedBase.html#method-i-inside_template" name="method-i-inside_template" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-inside_template_source')" id="l_method-i-inside_template_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L51" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-inside_template_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 51</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">inside_template</span>
  <span class="ruby-ivar">@inside_template</span> = <span class="ruby-keyword">true</span>
  <span class="ruby-keyword">yield</span>
<span class="ruby-keyword">ensure</span>
  <span class="ruby-ivar">@inside_template</span> = <span class="ruby-keyword">false</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-inside_template-3F">
            
              <b>inside_template?</b>()
            
            <a href="NamedBase.html#method-i-inside_template-3F" name="method-i-inside_template-3F" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-inside_template-3F_source')" id="l_method-i-inside_template-3F_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L58" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-inside_template-3F_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 58</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">inside_template?</span>
  <span class="ruby-ivar">@inside_template</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-module_namespacing">
            
              <b>module_namespacing</b>(&amp;block)
            
            <a href="NamedBase.html#method-i-module_namespacing" name="method-i-module_namespacing" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Wrap block with namespace of current application if namespace exists and is
not skipped</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-module_namespacing_source')" id="l_method-i-module_namespacing_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L35" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-module_namespacing_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 35</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">module_namespacing</span>(&amp;<span class="ruby-identifier">block</span>)
  <span class="ruby-identifier">content</span> = <span class="ruby-identifier">capture</span>(&amp;<span class="ruby-identifier">block</span>)
  <span class="ruby-identifier">content</span> = <span class="ruby-identifier">wrap_with_namespace</span>(<span class="ruby-identifier">content</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">namespaced?</span>
  <span class="ruby-identifier">concat</span>(<span class="ruby-identifier">content</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-namespace">
            
              <b>namespace</b>()
            
            <a href="NamedBase.html#method-i-namespace" name="method-i-namespace" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-namespace_source')" id="l_method-i-namespace_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L62" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-namespace_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 62</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">namespace</span>
  <span class="ruby-constant">Rails</span><span class="ruby-operator">::</span><span class="ruby-constant">Generators</span>.<span class="ruby-identifier">namespace</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-namespaced-3F">
            
              <b>namespaced?</b>()
            
            <a href="NamedBase.html#method-i-namespaced-3F" name="method-i-namespaced-3F" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-namespaced-3F_source')" id="l_method-i-namespaced-3F_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L66" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-namespaced-3F_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 66</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">namespaced?</span>
  <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-value">:skip_namespace</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">namespace</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-namespaced_class_path">
            
              <b>namespaced_class_path</b>()
            
            <a href="NamedBase.html#method-i-namespaced_class_path" name="method-i-namespaced_class_path" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-namespaced_class_path_source')" id="l_method-i-namespaced_class_path_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L86" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-namespaced_class_path_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 86</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">namespaced_class_path</span>
  <span class="ruby-ivar">@namespaced_class_path</span> <span class="ruby-operator">||=</span> [<span class="ruby-identifier">namespaced_path</span>] <span class="ruby-operator">+</span> <span class="ruby-ivar">@class_path</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-namespaced_file_path">
            
              <b>namespaced_file_path</b>()
            
            <a href="NamedBase.html#method-i-namespaced_file_path" name="method-i-namespaced_file_path" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-namespaced_file_path_source')" id="l_method-i-namespaced_file_path_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L82" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-namespaced_file_path_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 82</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">namespaced_file_path</span>
  <span class="ruby-ivar">@namespaced_file_path</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">namespaced_class_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;/&quot;</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-namespaced_path">
            
              <b>namespaced_path</b>()
            
            <a href="NamedBase.html#method-i-namespaced_path" name="method-i-namespaced_path" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-namespaced_path_source')" id="l_method-i-namespaced_path_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L90" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-namespaced_path_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 90</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">namespaced_path</span>
  <span class="ruby-ivar">@namespaced_path</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;::&quot;</span>).<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">m</span>.<span class="ruby-identifier">underscore</span> }[<span class="ruby-number">0</span>]
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-plural_file_name">
            
              <b>plural_file_name</b>()
            
            <a href="NamedBase.html#method-i-plural_file_name" name="method-i-plural_file_name" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-plural_file_name_source')" id="l_method-i-plural_file_name_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L133" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-plural_file_name_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 133</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">plural_file_name</span>
  <span class="ruby-ivar">@plural_file_name</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">file_name</span>.<span class="ruby-identifier">pluralize</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-plural_name">
            
              <b>plural_name</b>()
            
            <a href="NamedBase.html#method-i-plural_name" name="method-i-plural_name" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-plural_name_source')" id="l_method-i-plural_name_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L102" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-plural_name_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 102</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">plural_name</span>
  <span class="ruby-ivar">@plural_name</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">singular_name</span>.<span class="ruby-identifier">pluralize</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-plural_table_name">
            
              <b>plural_table_name</b>()
            
            <a href="NamedBase.html#method-i-plural_table_name" name="method-i-plural_table_name" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-plural_table_name_source')" id="l_method-i-plural_table_name_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L129" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-plural_table_name_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 129</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">plural_table_name</span>
  <span class="ruby-ivar">@plural_table_name</span> <span class="ruby-operator">||=</span> (<span class="ruby-identifier">pluralize_table_names?</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">table_name</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">table_name</span>.<span class="ruby-identifier">pluralize</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-pluralize_table_names-3F">
            
              <b>pluralize_table_names?</b>()
            
            <a href="NamedBase.html#method-i-pluralize_table_names-3F" name="method-i-pluralize_table_names-3F" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-pluralize_table_names-3F_source')" id="l_method-i-pluralize_table_names-3F_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L171" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-pluralize_table_names-3F_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 171</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">pluralize_table_names?</span>
  <span class="ruby-operator">!</span><span class="ruby-keyword">defined?</span>(<span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>) <span class="ruby-operator">||</span> <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">pluralize_table_names</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-regular_class_path">
            
              <b>regular_class_path</b>()
            
            <a href="NamedBase.html#method-i-regular_class_path" name="method-i-regular_class_path" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-regular_class_path_source')" id="l_method-i-regular_class_path_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L78" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-regular_class_path_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 78</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">regular_class_path</span>
  <span class="ruby-ivar">@class_path</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-route_url">
            
              <b>route_url</b>()
            
            <a href="NamedBase.html#method-i-route_url" name="method-i-route_url" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-route_url_source')" id="l_method-i-route_url_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L137" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-route_url_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 137</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">route_url</span>
  <span class="ruby-ivar">@route_url</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">class_path</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">dname</span><span class="ruby-operator">|</span> <span class="ruby-string">&quot;/&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">dname</span> }.<span class="ruby-identifier">join</span> <span class="ruby-operator">+</span> <span class="ruby-string">&quot;/&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">plural_file_name</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-singular_table_name">
            
              <b>singular_table_name</b>()
            
            <a href="NamedBase.html#method-i-singular_table_name" name="method-i-singular_table_name" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-singular_table_name_source')" id="l_method-i-singular_table_name_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L125" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-singular_table_name_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 125</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">singular_table_name</span>
  <span class="ruby-ivar">@singular_table_name</span> <span class="ruby-operator">||=</span> (<span class="ruby-identifier">pluralize_table_names?</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">table_name</span>.<span class="ruby-identifier">singularize</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">table_name</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-table_name">
            
              <b>table_name</b>()
            
            <a href="NamedBase.html#method-i-table_name" name="method-i-table_name" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-table_name_source')" id="l_method-i-table_name_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L110" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-table_name_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 110</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">table_name</span>
  <span class="ruby-ivar">@table_name</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
    <span class="ruby-identifier">base</span> = <span class="ruby-identifier">pluralize_table_names?</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">plural_name</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">singular_name</span>
    (<span class="ruby-identifier">class_path</span> <span class="ruby-operator">+</span> [<span class="ruby-identifier">base</span>]).<span class="ruby-identifier">join</span>(<span class="ruby-string">'_'</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-uncountable-3F">
            
              <b>uncountable?</b>()
            
            <a href="NamedBase.html#method-i-uncountable-3F" name="method-i-uncountable-3F" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-uncountable-3F_source')" id="l_method-i-uncountable-3F_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L117" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-uncountable-3F_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 117</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">uncountable?</span>
  <span class="ruby-identifier">singular_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">plural_name</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-wrap_with_namespace">
            
              <b>wrap_with_namespace</b>(content)
            
            <a href="NamedBase.html#method-i-wrap_with_namespace" name="method-i-wrap_with_namespace" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-wrap_with_namespace_source')" id="l_method-i-wrap_with_namespace_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/4da888f38452d9727c77fd91cd7a267e4e1eec42/railties/lib/rails/generators/named_base.rb#L46" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-wrap_with_namespace_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/generators/named_base.rb, line 46</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">wrap_with_namespace</span>(<span class="ruby-identifier">content</span>)
  <span class="ruby-identifier">content</span> = <span class="ruby-identifier">indent</span>(<span class="ruby-identifier">content</span>).<span class="ruby-identifier">chomp</span>
  <span class="ruby-node">&quot;module #{namespace.name}\n#{content}\nend\n&quot;</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                    </div>

    </div>
  </body>
</html>    